package com.foxitcloud.util;

import java.io.InputStreamReader;
import java.util.Properties;

/**
 * @Description 全局变量
 * @author xxu
 * @CreateDate 2015年1月17日 下午5:23:40
 */
public class GlobalVar
{
	private static Properties config;
	
	public static int SEARCH_THREAD_POOL_MIN = 100;
	
	public static int SEARCH_THREAD_POOL_MAX = 200;
	
	public static int SEARCH_THREAD_POOL_KEEPALIVETIME = 1000;
	
	static
	{
		try
		{
			// 1.读取配置文件信息
			if( config == null )
			{
				config = new Properties();
			}
			
			String propFileName = "application.properties";
			InputStreamReader isr = new InputStreamReader( GlobalVar.class.getClassLoader().getResourceAsStream( propFileName ), "UTF-8" );
			config.load( isr );
			isr.close();
			
						
			
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
	
}
